<template>
	<view class="container">
		<!-- <van-circle>1</van-circle> -->
		<van-circle v-model="currentRate" :speed="100" layer-color="#ebedf0" color="#07c160" stroke-width="13" size="152">
			<view class="">精洗A套餐</view>
			<view class="">洗发中</view>
			<van-count-down :time="time" :format="itemText" class="countDowm" />
		</van-circle>
		view
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 当前进度
				currentRate: 0,
				real: 0,
				time: 200*1000,
				itemText: '剩余mm分ss秒',
				timer: null,
			}
		},
		onLoad() {
			this.timer = setInterval(() => {
				//每秒渲染的
				this.real += 100 / (this.time/1000 - 1)
				this.currentRate = Math.round(this.real)
				if (this.real >= 100) {
					clearTimeout(this.timer)
				}
			}, 1000)
		},
		methods: {
		},
		computed: {
			text() {
				return this.itemText
			},
		}
	}
</script>

<style scoped>
	
.tit{
	position: absolute;
}
</style>
